<template>
  <div id="app">
    <div class="row">
      <div class="col-xs-offset-2 col-xs-8">
        <div class="page-header"><h2>Router Basic - 01</h2></div>
      </div>
    </div>
    <div class="row">
      <div class="col-xs-2 col-xs-offset-2">
        <div class="list-group">
          <router-link class="list-group-item" to="/about">about</router-link>
          <router-link class="list-group-item" to="/home">home</router-link>
          <!--<router-link class="list-group-item" to="/user">user</router-link>-->
          <!--<a href="javascript:;" class="list-group-item" @click="toAbout">about</a>
          <a href="javascript:;" class="list-group-item" @click="toHome">home</a>-->
          <a href="javascript:;" class="list-group-item" @click="toUser">user</a>
          <a href="javascript:;" class="list-group-item" @click="toTest1">test-1</a>
          <a href="javascript:;" class="list-group-item" @click="toTest2">test-2</a>
        </div>
      </div>
      <div class="col-xs-6">
        <div data-v-957c9522="" class="col-xs-6">
          <div data-v-957c9522="" class="panel">
            <div data-v-957c9522="" class="panel-body">
              <router-view></router-view>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'App',
    methods:{
      toAbout(){
        // this.$router.push(`/about?name=damu`)
        this.$router.push({
          path:"/about",
          query:{
            name:"damu666"
          }
        })
      },
      toHome(){
        // this.$router.push("/home")
        this.$router.push({
          path:"/home"
        })
      },
      toUser(){
        // this.$router.push("/user")
        this.$router.push({
          path:"/user"
        })
      },
      "toTest1"(){
        this.$router.push({
          name:"test",
          params:{
            id:1
          }
        })
      },
      "toTest2"(){
        this.$router.push({
          name:"test",
          params:{
            id:2
          }
        })
      }
    }
  }
</script>

<style scoped>

</style>
